import React from "react";
import './style.css';
const Dialog = (props) => {
  const { show, close, children } = props
  return (
    <div className="dialog" style={{ display: show ? 'flex': 'none' }}>
      <div className="content">
        <h2>
          <span onClick={() => close()}>X</span>
        </h2>
        {children}
      </div>
    </div>
  );
};

export default Dialog;
